package cn.mxb.logic.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.mxb.floor.pagination.Result;
import cn.mxb.logic.dao.SysRoleDAO;
import cn.mxb.logic.entity.SysRole;
import cn.mxb.logic.service.ISysRoleService;

@Service("sysRoleService")
public class SysRoleServiceImpl  implements ISysRoleService {

	@Autowired
	private SysRoleDAO sysRoleDAO;
	
	
	@Override
	public SysRole findByProperty(String property, String value) {
		return sysRoleDAO.findByProperty(property, value);
	}

	/**
	 * 分页
	 */
	@Override
	public Result<SysRole> find(SysRole sysRole, int page, int row) {
		return sysRoleDAO.find(sysRole, page, row);
	}

	/**
	 * add
	 */
	@Override
	public SysRole add(SysRole SysRole) {
		return sysRoleDAO.save(SysRole);
	}

	@Override
	public void delete(int id) {
		sysRoleDAO.remove(SysRole.class,id);
	}
	@Override
	public void update(SysRole SysRole) {
		
	}
	
	@Override
	public List<SysRole> findListByProperty(String property, String value) {
		return sysRoleDAO.findListByProperty(property, value);
	}

	/**
	 * 查询全部
	 */
	@Override
	public List<SysRole> findAllList() {
		return sysRoleDAO.getAll(SysRole.class);
	}


	
}
